package cn.edu.scau.cmi.zhengweixin.singleton;

public class ChairmanSington {

	private static volatile ChairmanSington chairman = null;
	private String name;

	private ChairmanSington(String name) {
		this.name = name;
	}

	public static ChairmanSington getInstance(String name) {
		if (null == chairman) {
			synchronized (ChairmanSington.class) {
				if (null == chairman) {
					chairman = new ChairmanSington(name);
					return chairman;
				}
			}
		}
		return chairman;

	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "Chairman [name=" + name + ",hashcode=" + this.hashCode() + "]";
	}
	
}
